import { getClubList, getClubDetail } from './club'
import { getActivitiesByClubId, getActivityDetail } from './activity'

/**
 * 流式生成活动总结
 * @param {Object} params 参数 {clubId, activityId, customPrompt}
 * @returns {EventSource}
 */
export function streamActivitySummary(params) {
  const queryParams = new URLSearchParams()
  if (params.clubId) queryParams.append('clubId', params.clubId)
  if (params.activityId) queryParams.append('activityId', params.activityId)
  if (params.customPrompt) queryParams.append('customPrompt', params.customPrompt)
  
  const url = `http://localhost:8080/ai/summary/stream?${queryParams}`
  console.log("📡 创建SSE连接:", url)
  
  return new EventSource(url)
}

// 导出其他API方法供组件使用
export { getClubList, getClubDetail, getActivitiesByClubId, getActivityDetail }